const publicPath = '/static/';

module.exports = {
  publicPath,
  outputDir: 'dist',
  assetsDir: 'assets',
  productionSourceMap: false,
  devServer: {
    publicPath, 
    port: 5000,
    proxy: {
      '/xxx': {
        target: 'http://192.168.xx.xx',
        ws: false,
        changeOrigin: true
      }
    }
  },
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          require('autoprefixer')({
            browsers: ["> 1%", "last 2 versions"]
          }),
          require("postcss-px-to-viewport")({
            unitToConvert: "px",
            viewportWidth: 750,
            unitPrecision: 3,
            propList: [
              "*"
            ],
            viewportUnit: "vw",
            fontViewportUnit: "vw",
            selectorBlackList: ['.ignore', '.hairlines'],
            minPixelValue: 1,
            mediaQuery: false,
            // replace: true,
            // landscape: false,
            // landscapeUnit: 'vw',
            // landscapeWidth: 750,
            exclude: /(\/|\\)(node_modules)(\/|\\)/,
          })
        ]
      }
    }
  }
}